﻿using BCEntity.WeChatComponent.WeChatKeyword;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.WeChatComponent.WeChatKeyword
{
    /// <summary>
    /// 微信关键字数据处理接口
    /// </summary>
    public interface IWeChatKeywordData
    {
        /// <summary>
        /// 检查关键字是否已存在
        /// </summary>
        /// <param name="weChatKeywordId">关键字Id</param>
        /// <returns></returns>
        bool CheckKeywordExists(int weChatKeywordId);
        /// <summary>
        /// 检查关键字是否已存在
        /// </summary>
        /// <param name="keyword">关键字</param>
        /// <returns></returns>
        bool CheckKeywordExists(string keyword);
        /// <summary>
        /// 创建微信关键字信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        WeChatKeywordEntity Create(WeChatKeywordEntity entity);

        /// <summary>
        /// 分页获取微信关键字信息
        /// </summary>
        /// <param name="keyword">关键字</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="dataCount">返回数量</param>
        /// <param name="ascending">排序</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页数</param>
        /// <returns></returns>
        IEnumerable<WeChatKeywordEntity> GetWeChatKeywordList(string keyword, DateTime? start, DateTime? end, out int dataCount, bool? ascending, int pageIndex = 1, int pageSize = 10);

        /// <summary>
        /// 获取一条微信关键字信息
        /// </summary>
        /// <param name="weChatKeywordId">主键</param>
        /// <returns></returns>
        WeChatKeywordEntity GetWeChatKeywordById(int weChatKeywordId);
        /// <summary>
        /// 获取一条微信关键字信息
        /// </summary>
        /// <param name="keyword">关键字</param>
        /// <returns></returns>
        WeChatKeywordEntity GetWeChatKeyword(string keyword);
        /// <summary>
        /// 更新一条微信关键字信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        WeChatKeywordEntity Update(WeChatKeywordEntity entity);

        /// <summary>
        /// 删除一条微信关键字信息
        /// </summary>
        /// <param name="weChatKeywordId">主键</param>
        /// <returns></returns>
        bool Delete(int weChatKeywordId);

        /// <summary>
        /// 获取所有微信关键字信息
        /// </summary>
        /// <returns></returns>
        IEnumerable<WeChatKeywordEntity> GetWeChatKeywordAll();
    }
}
